import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import {BrowserRouter} from 'react-router-dom'
import * as serviceWorker from './serviceWorker';
import axios from 'axios'
import $api from './assets/js/apis'
// 将axios和$api添加到Component原型链中，方便其他组件继承，在组件中使用
Component.prototype.$axios = axios
Component.prototype.$api = $api

// 改造app组件
ReactDOM.render(<BrowserRouter><App /></BrowserRouter>, document.getElementById('root'));

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();
